package com.ruicar.afs.cloud.basic.api.corporate.fegin;

import com.ruicar.afs.cloud.basic.api.corporate.dto.BasicPenaltyExemptDto;
import com.ruicar.afs.cloud.basic.api.dto.UpdateBankCardInfoDto;
import com.ruicar.afs.cloud.basic.api.dto.UpdateCustInfoDto;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import com.ruicar.afs.cloud.common.vo.RevokeHandleVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <p>Description: </p>
 *
 * @author ZC.GUO
 * @version 1.0
 * @date create on 2020-07-20 15:28
 */
@FeignClient(value = "${com.ruicar.service-names.basic-server}")
public interface CorporateTransferFeign {


    @ApiOperation("更新身份信息")
    @PostMapping(value = "/updateContract/updateCustInfo")
    public IResponse updateCustInfo(@RequestBody UpdateCustInfoDto dto);

    @ApiOperation("更新银行卡信息")
    @PostMapping(value = "/updateContract/updateBankInfo")
    public IResponse updateBankInfo(@RequestBody UpdateBankCardInfoDto dto);

    /**
     * 收款撤销发起收据处理
     * @author ZC.GUO
     * @param receiptId 撤销收据的id
     * @return
     */
    @ApiOperation("收款撤销发起收据处理")
    @PostMapping(value = "receiptHandle/receiptHandleForCancelStart")
    IResponse receiptHandleForCancelStart(@RequestParam("receiptId") Long receiptId,@RequestParam("caseNo") String caseNo);
    /**
     * 收款撤销拒绝收据处理
     * @author ZC.GUO
     * @param receiptId 撤销收据的id
     * @return
     */
    @ApiOperation("收款撤销拒绝收据处理")
    @PostMapping(value = "receiptHandle/receiptHandleForCancelReject")
    IResponse receiptHandleForCancelReject(@RequestParam("receiptId") Long receiptId,@RequestParam("operator")String operator);
    /**
     * 收款撤销通过收据处理
     * @param receiptId 审核通过信息
     * @return
     */
    @ApiOperation("收款撤销通过收据处理")
    @PostMapping(value = "receiptHandle/receiptHandleForCancel")
    IResponse receiptHandleForCancelAgree(@RequestParam("receiptId") Long receiptId, @RequestParam("operator")String operator);

    /**
     * 撤销处理流程发起
     * @return
     */
    @ApiOperation("撤销处理流程发起")
    @PostMapping(value = "revokeHandle/revokeHandleStart")
    IResponse revokeHandleStart(@RequestParam("receiptId") Long receiptId ,@RequestParam("treatmentMethod") String treatmentMethod,@RequestParam("caseNo") String caseNo);

    /**
     * 撤销处理审批通过撤销信息处理
     * @param receiptId
     * @return
     */
    @ApiOperation("撤销处理审批通过撤销信息处理")
    @PostMapping(value = "revokeHandle/revokeHandleAgree")
    IResponse revokeHandleAgree(@RequestParam("receiptId") Long receiptId);
    /**
     * 撤销处理拒绝撤销信息处理
     * @param receiptId
     * @return
     */
    @ApiOperation("撤销处理拒绝撤销信息处理")
    @PostMapping(value = "revokeHandle/revokeHandleReject")
    IResponse revokeHandleReject(@RequestParam("receiptId") Long receiptId);

    @PostMapping("/revokeHandle/getRevokeHandleVo")
    @ApiOperation(value = "获取收据信息")
    IResponse<RevokeHandleVo> getRevokeHandleVo(@RequestParam("receiptId") Long receiptId);

    /**
     * 豁免罚息处理
     * @author xudongdong
     * @param penaltyExemptDto
     * @return
     */
    @ApiOperation("更新合同每期罚息明细")
    @PostMapping(value = "basicCostExemptBillInfo/updatePenaltyInterest")
    IResponse updatePenaltyInterest(@RequestBody BasicPenaltyExemptDto penaltyExemptDto);
}
